package com.example.jpatest.entity;

import lombok.Data;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.OneToOne;

@Entity
@Data
@DiscriminatorValue("CashReward")
public class CashReward extends Reward{

    private String prize;

    @OneToOne(targetEntity = Teacher.class)
    private Teacher teacher;


}
